package com.ikun.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ikun.dao.NoticesDao;
import com.ikun.entity.Notices;
import com.ikun.service.NoticesService;

@Service
public class NoticesServiceImpl implements NoticesService {

    @Autowired
    private NoticesDao noticesDao;

    @Override
    public List<Notices> findAllNotices() {
        return noticesDao.findAllNotices();
    }

    @Override
    public List<Notices> findByContent(String keyword) {
        return noticesDao.findByContent(keyword);
    }

    @Override
    public List<Notices> findBylist(Integer noticeId) {
        return noticesDao.findByList(noticeId);
    }

    @Override
    public List<Notices> findNoticesById(Integer userId) {
        return noticesDao.findNoticesById(userId);
    }

    @Override
    public int publishToOwners(Notices notices) {
        return noticesDao.publishToOwners(notices);
    }

    @Override
    public String addNotice(String content, String title) {
        return noticesDao.addNotice(content, title);
    }
}
